/* 区块样式 */
.section {
    padding: 3em;
    text-align: center;
    background-color: #fff;
    margin: 2em 0;
    
}

.section h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
}
/* 外层容器 */
.container{
    display: flex;
    flex-direction: row;
    margin-bottom: 30px;
    margin-top: 30px;
}
/* 搜索栏样式 */
.search-bar {
    display: flex;
    margin-bottom: 20px;
    width: 400px;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.search-bar button:hover {
    background-color: #4cae4c;
}

/* 分类选择样式 */
.category-selector {
    margin-bottom: 20px;
    width: 750px;
    margin-left: -100px;
    margin-top: 10px;
}

/* .category-selector label {
    font-size: 16px;
    margin-right: 10px;
}

.category-selector select {
    padding: 8px;
    font-size: 16px;
} */
 .category-selector button{
    font-size: 18px;
    background-color: white;
    border: none;
    margin-left: 30px;
    cursor: pointer;
 }
 .category-button.active {
    color: #53b5f1; /* 这里可以设置为你想要的颜色，用于表示选中状态 */
}

/* 文章列表样式 */
.article-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* 保持块之间的间距 */
}

/* 调整文章块的宽度 */
.article-card {
    width: calc((100% / 3) - 20px); /* 确保每行3个块 */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.article-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
}

.article-card p {
    color: #666;
    margin-bottom: 4px;
}


/* 资源类型选择栏 */
.resource-type-selector {
    margin-bottom: 20px;
    margin-top: 20px;
    margin-left: -1265px;
    font-size: 18px;
}
.resource-type-selector label {
    margin-right: 10px;
}

#resource-type {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* 资源列表样式 */
.resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.resource-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: calc(33.333% - 20px);
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.resource-card h3 {
    margin-top: 0;
    margin-bottom: 6px;

}

.resource-card p {
    color: #666;
    margin-bottom: 4px;
}

.resource-card button {
    padding: 5px 10px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.resource-card button:hover {
    background-color: #4cae4c;
}

/* 每页条数选择样式 */
.page-size-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.page-size-selector label {
    font-size: 16px;
    margin-right: 10px;
    color: #333;
}

.page-size-selector select {
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}

.page-size-selector select:focus {
    outline: none;
    border-color: #5cb85c;
}

/* 分页按钮样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f8f8;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pagination button:hover {
    background-color: #5cb85c;
    border-color: #5cb85c;
    color: white;
}

.pagination button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.pagination button.active {
    background-color: #5cb85c;
    border-color: #5cb85c;
    color: white;
}

.add-article {
    display: flex;
    justify-content: center; /* 居中按钮 */
    margin: 20px 0;         /* 设置顶部和底部间距 */
}

.add-article button {
    background-color: #28a745; /* 按钮的背景色（绿色） */
    color: white;             /* 按钮文字颜色 */
    border: none;             /* 去掉边框 */
    border-radius: 5px;       /* 圆角 */
    padding: 10px 20px;       /* 内边距，增大点击区域 */
    font-size: 16px;          /* 字体大小 */
    cursor: pointer;          /* 鼠标悬停时显示手势 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
    transition: all 0.3s ease; /* 增加过渡效果 */
}

.add-article button:hover {
    background-color: #218838; /* 鼠标悬停时更深的绿色 */
    transform: scale(1.05);   /* 鼠标悬停时放大 */
}

.add-article button:active {
    background-color: #1e7e34; /* 点击时更深的颜色 */
    transform: scale(0.95);    /* 点击时缩小 */
}

@media (max-width: 768px) {
    .article-card {
        width: calc((100% / 2) - 20px); /* 每行2个 */
    }
}

@media (max-width: 480px) {
    .article-card {
        width: 100%; /* 每行1个 */
    }
}
